package com.example.tetris.Tetris;

import com.example.tetris.Tetris.TetrisBackgroundCells;
import ohos.aafwk.ability.Ability;
import ohos.agp.components.Component;
import ohos.agp.utils.Color;

public class TetrisProperties extends TetrisBackgroundCells {
    public TetrisProperties(Ability ability, Component component) {
        super(ability, component);
    }

    public TetrisProperties(Ability ability, Component component, int[][] drawBlock) {
        super(ability, component, drawBlock);
    }

    //获取方块背景颜色
    public Color getBlockColor() {
        return blockColor;
    }

    //获取背景小方格颜色
    public Color getBackgroundCellColor() {
        return backgroundCellColor;
    }

    //设置方块背景颜色
    public void setBlockColor(Color blockColor) {
        this.blockColor = blockColor;
        component.invalidate();
    }
    //设置游戏背景小方格颜色
    public void setBackgroundCellColor(Color backgroundCellColor){
        this.backgroundCellColor=backgroundCellColor;
        component.invalidate();
    }
}
